/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Jorge
 */
@Entity
@Table(name = "estrategias_globales", catalog = "mydb2", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EstrategiasGlobales.findAll", query = "SELECT e FROM EstrategiasGlobales e"),
    @NamedQuery(name = "EstrategiasGlobales.findByIdestrategiasGlobales", query = "SELECT e FROM EstrategiasGlobales e WHERE e.idestrategiasGlobales = :idestrategiasGlobales"),
    @NamedQuery(name = "EstrategiasGlobales.findByDescripcion", query = "SELECT e FROM EstrategiasGlobales e WHERE e.descripcion = :descripcion")})
public class EstrategiasGlobales implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idestrategias_globales", nullable = false)
    private Integer idestrategiasGlobales;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 500)
    @Column(nullable = false, length = 500)
    private String descripcion;

    public EstrategiasGlobales() {
    }

    public EstrategiasGlobales(Integer idestrategiasGlobales) {
        this.idestrategiasGlobales = idestrategiasGlobales;
    }

    public EstrategiasGlobales(Integer idestrategiasGlobales, String descripcion) {
        this.idestrategiasGlobales = idestrategiasGlobales;
        this.descripcion = descripcion;
    }

    public Integer getIdestrategiasGlobales() {
        return idestrategiasGlobales;
    }

    public void setIdestrategiasGlobales(Integer idestrategiasGlobales) {
        this.idestrategiasGlobales = idestrategiasGlobales;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idestrategiasGlobales != null ? idestrategiasGlobales.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EstrategiasGlobales)) {
            return false;
        }
        EstrategiasGlobales other = (EstrategiasGlobales) object;
        if ((this.idestrategiasGlobales == null && other.idestrategiasGlobales != null) || (this.idestrategiasGlobales != null && !this.idestrategiasGlobales.equals(other.idestrategiasGlobales))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "negocio.EstrategiasGlobales[ idestrategiasGlobales=" + idestrategiasGlobales + " ]";
    }
    
}
